﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using SoccerEvaluator.Common;
using SoccerEvaluator.Business;
using SoccerEvaluator.WebSite.App_Code;

namespace SoccerEvaluator.WebSite
{
    /// <summary>
    /// 
    /// </summary>
    public partial class MatchSummary : System.Web.UI.Page
    {

        /// <summary>
        /// 
        /// </summary>
        protected string _groupName;

        /// <summary>
        ///
        /// </summary>
        protected int _groupID
        {
            get
            {
                if (Session["GroupId"] != null)
                {
                    return int.Parse(Session["GroupId"].ToString());
                }
                else return 0;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                SoccerEvaluatorModelContainer context = new SoccerEvaluatorModelContainer();

                Group dbGroup = context.Groups.FirstOrDefault(c => c.Id == _groupID);

                _groupName = dbGroup.Name;

            }
        }
    }

}